
// OpenGL Helper Functions
/**
  * Created on 02/20/2012
  * By Anshul Kanakia
  *
  */


#pragma once

#ifndef _OPENGL_FUNCTIONS
#define _OPENGL_FUNCTIONS

#include "OGLScene.h"

#include <gl/glew.h>
#include <gl/GLU.h>
#include <gl/glfw.h>
#include <glm/glm.hpp>

#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <string>
#include <vector>
#include <math.h>
#include <sstream>

#define NUM_ROBOTS 10
#define WINDOW_TITLE "Droplets Renderer - Running at FPS "

// Public functions
int OGLCreateVertexArrayObject(GLuint *vaoid_out);
int OGLCreateVertexBufferObject(
	GLvoid *vbd, 
	GLsizeiptr size,
	GLenum data_type, 
	GLenum data_usage,
	GLuint *vboid_out);

GLuint OGLLoadShader(const char *file_path, const int shader_type);
GLuint OGLLoadProgram(std::vector<GLuint> shader_ids);

// Main Rendering Loop function
void OGLMainLoop(void);

// GLFW Callback Functions
void GLFWCALL OGLWindowResizeCallback(int width, int height);
void GLFWCALL OGLKeystrokeCallback(int ch, int action);
void GLFWCALL OGLMouseButtonCallback(int button, int action);

// Other Helpers
std::string IntToString(int number);

#endif